package com.mall.common.utils;

import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class Response {
    private Integer code; //自定义响应状态码
    private String msg; //自定义响应消息
    private Object data; //响应数据

    public Response(ResponseMessage responseMessage){
        this.code=responseMessage.code;
        this.msg=responseMessage.msg;
    }

    public Response data(Object data){
        this.data=data;
        return this;
    }
}
